package cn.iocoder.lw.module.core.controller.admin.house.vo;

import cn.iocoder.lw.module.core.enums.DictTypeConstants;
import com.mzt.logapi.starter.annotation.DiffLogField;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import static cn.iocoder.lw.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

import java.math.BigDecimal;
import java.time.LocalDateTime;

import org.springframework.format.annotation.DateTimeFormat;

@Schema(description = "管理后台 - 核心房源新增/修改 Request VO")
@Data
public class CoreHouseSaveReqVO {

    @Schema(description = "房源编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    private Long id;

    @Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @DiffLogField(name = "项目编号")
    @NotNull(message = "项目编号不能为空")
    private Long projectId;

    @Schema(description = "小区名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "示例小区")
    @DiffLogField(name = "小区名称")
    @Size(max = 100, message = "小区名称长度不能超过100个字符")
    private String communityName;

    @Schema(description = "楼栋", requiredMode = Schema.RequiredMode.REQUIRED, example = "1号楼")
    @DiffLogField(name = "楼栋")
    @Size(max = 50, message = "楼栋长度不能超过50个字符")
    private String building;

    @Schema(description = "楼层", requiredMode = Schema.RequiredMode.REQUIRED, example = "5层")
    @DiffLogField(name = "楼层")
    @Size(max = 20, message = "楼层长度不能超过20个字符")
    private String floor;

    @Schema(description = "房间号", requiredMode = Schema.RequiredMode.REQUIRED, example = "501")
    @DiffLogField(name = "房间号")
    @Size(max = 20, message = "房间号长度不能超过20个字符")
    private String roomNumber;

    @Schema(description = "经度", example = "116.397128")
    @DiffLogField(name = "经度")
    private BigDecimal longitude;

    @Schema(description = "纬度", example = "39.916527")
    @DiffLogField(name = "纬度")
    private BigDecimal latitude;

    @Schema(description = "水表编号", example = "W20230001")
    @DiffLogField(name = "水表编号")
    @Size(max = 50, message = "水表编号长度不能超过50个字符")
    private String waterMeterNumber;

    @Schema(description = "电表编号", example = "E20230001")
    @DiffLogField(name = "电表编号")
    @Size(max = 50, message = "电表编号长度不能超过50个字符")
    private String electricityMeterNumber;

    @Schema(description = "门锁编号", example = "L20230001")
    @DiffLogField(name = "门锁编号")
    @Size(max = 50, message = "门锁编号长度不能超过50个字符")
    private String lockNumber;

    @Schema(description = "房源类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @DiffLogField(name = "房源类型")
    private Integer houseType;

    @Schema(description = "房源面积（平方米）", example = "85.5")
    @DiffLogField(name = "房源面积")
    @DecimalMin(value = "0", message = "房源面积不能小于0")
    private BigDecimal area;

    @Schema(description = "房源状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @DiffLogField(name = "房源状态")
    private Integer status;

    @Schema(description = "租金（元/月）", example = "3500.00")
    @DiffLogField(name = "租金")
    @DecimalMin(value = "0", message = "租金不能小于0")
    private BigDecimal rent;

    @Schema(description = "房源描述", example = "精装修两室一厅，采光良好")
    @DiffLogField(name = "房源描述")
    @Size(max = 500, message = "房源描述长度不能超过500个字符")
    private String description;

    @Schema(description = "联系人姓名", example = "张三")
    @DiffLogField(name = "联系人姓名")
    @Size(max = 50, message = "联系人姓名长度不能超过50个字符")
    private String contactName;

    @Schema(description = "联系人手机号", example = "13800138000")
    @DiffLogField(name = "联系人手机号")
    private String contactPhone;

    @Schema(description = "备注", example = "该房源朝南，交通便利")
    @DiffLogField(name = "备注")
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;
    
    @Schema(description = "创建时间")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime[] createTime;
    
}